An object-oriented database represents information in the form of objects which are instantiated from object class definitions and which typically include attributes, relationships and methods, collectively referred to as properties. An object class defines the data that the object will store and the functions that will operate on the data. Functions that operate on the data may be called methods. The object class definitions are typically structured to take advantage of property inheritance from parent to child. Inheritance is a mechanism which allows a second class to inherit properties from a first class. When a second class inherits from a first class, objects of the second class have access to attributes and methods of the first class without the need to redefine the attributes and methods locally. When a second class inherits from a first class, then the first class is called a parent class or superclass of the second class. The second class is called the child or subclass of the first class. Inheritance forces a child class to offer the same properties as its parent class. Thus, objects of a child may be used where objects of the corresponding parent are ordinarily used because objects of the child behave like objects of the parent. Multiple inheritance means that one child class may have more than one parent class, thus enabling the child class to inherit properties of more than one parent class and to merge the properties of the parent classes. The objects instantiated from a given class share a common property structure as if stamped from a common template (i.e., they are polymorphic). Polymorphism allows programs to apply the same operation to objects of different classes, thus allowing the same interface to access different objects. There are typically four basic data types (int, char, float, and double), each of which defines a set of values that the variable can store and a set of operations that the program can perform on the data. Each instantiated object""s property values are independent from the property values of other objects. When copies of an instantiated object (hereinafter referred to simply as an xe2x80x9cobjectxe2x80x9d) are generated, the property values are also copied. However, any future changes to the original or new object property values are reflected only in the object that was changed. In general, this separation between object property values is desired and any linkages between object property values are achieved using relationships. However, advanced object copy and replication approaches (such as cloning; cloning is defined below) and representing objects in multiple contexts require a means for efficiently linking groups of multiple object property values.
The following introduces a new method and data structure that employs Complex Objects to provide the necessary linkages between instantiated object property values. This capability is necessary where groups of object property values must be efficiently shared across multiple objects (e.g., object cloning) or where multiple representations are desired for a given object (e.g., multiple views).
The present invention provides a method, server, computer and data structure for generating at least two Complex Objects, each having at least one Component Object, wherein each of said Complex Objects shares at least one Component Object with another Complex. Object. A Complex Object includes: (1) one and only one Component Object that contains the identity properties unique to the Complex Object and (2) at least one other Component (i.e., Simple) Object identifying other properties of the Complex Object. By using a combination of Tailored Server and class methods (for construction, destruction, property access, copy, delete, clone, etc.) in handling the Complex Objects, the present invention hides the multiple Component Object complexity from the user and manages the generation and modification of Complex Objects including object schema definition and object instantiation. Thus, for example, Complex Object cloning permits a simultaneous change for a common core property value to be accomplished for all clones that share the Shared Component Object without the overhead of dynamically linking or replicating attribute values across objects. Additionally, the method of the present invention reduces memory requirements for storing cloned objects.